package com.shuoyue.ycgk.umeng;

import com.shuoyue.ycgk.MyApplication;
import com.umeng.analytics.MobclickAgent;
import com.umeng.commonsdk.UMConfigure;

public class UmUtils {
    public static void preInit() {
        UMConfigure.preInit(MyApplication.getInstance(), "60123197f1eb4f3f9b75db48",
                "Umeng");
    }

    public static void init() {
        UMConfigure.setLogEnabled(true);
        UMConfigure.init(MyApplication.getInstance(), "60123197f1eb4f3f9b75db48",
                "Umeng", UMConfigure.DEVICE_TYPE_PHONE,
                "");
        //集成umeng-crash-vx.x.x.aar，则需要关闭原有统计SDK异常捕获功能
        MobclickAgent.setCatchUncaughtExceptions(false);
        //PushSDK初始化(如使用推送SDK，必须调用此方法)
//        initUpush();

        //统计SDK是否支持采集在子进程中打点的自定义事件，默认不支持
        UMConfigure.setProcessEvent(true);//支持多进程打点

        MobclickAgent.setPageCollectionMode(MobclickAgent.PageMode.AUTO);
    }
}
